package com.ssm.web.controller;

import com.ssm.core.task.AsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AsyncController {

    @Autowired
    private AsyncService asyncService;

    @ResponseBody
    @GetMapping("async")
    public String async() throws InterruptedException {
        asyncService.hello();
        return "success";
    }
}